// eslint-disable-next-line
import { UserLayout, BasicLayout, RouteView, BlankLayout, PageView } from '@/layouts'
import { bxAnaalyse } from '@/core/icons'

export const asyncRouterMap = [
    {
        path: '/',
        name: 'index',
        component: BasicLayout,
        meta: { title: '5G时代后台' },
        redirect: '/home',
        children: [
            /*首页*/
            {
                path: '/home',
                name: 'home',
                component: () => import('@/views/home/index'),
                meta: { title: '数据统计', keepAlive: true, icon: "pie-chart", permission: ['dashboard'] },
            },
            /* 会员管理*/
            {
                path: '/member',
                name: 'member',
                redirect: '/member/memberList',
                component: RouteView,
                meta: { title: '会员管理', keepAlive: true, icon: "team", permission: ['dashboard'] },
                children: [
                    {
                        path: '/member/memberList',
                        name: 'memberList',
                        component: () => import('@/views/member/memberList'),
                        meta: { title: '会员列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/member/addMember',
                        name: 'addMember',
                        component: () => import('@/views/member/addMember'),
                        meta: { title: '会员(新增/编辑)', keepAlive: true, permission: ['dashboard'] },
                        hidden:true
                    },
                    {
                        path: '/member/teamTree',
                        name: 'teamTree',
                        component: () => import('@/views/member/teamTree'),
                        meta: { title: '团队关系', keepAlive: true, permission: ['dashboard'] },
                        hidden:true
                    },
                    {
                        path: '/member/pingtai',
                        name: 'pingtai',
                        component: () => import('@/views/member/pingtai'),
                        meta: { title: '平台账号', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/member/teamCaptain',
                        name: 'teamCaptain',
                        component: () => import('@/views/member/teamCaptain'),
                        meta: { title: '激活审核列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/member/editReceiveList',
                        name: 'editReceiveList',
                        component: () => import('@/views/member/editReceiveList'),
                        meta: { title: '收款资料', keepAlive: true, permission: ['dashboard'] },
                        hidden:true
                    },
                    {
                        path: '/member/teamCaptainDetails',
                        name: 'teamCaptainDetails',
                        component: () => import('@/views/member/teamCaptainDetails'),
                        meta: { title: '团队长详情', keepAlive: true, permission: ['dashboard'] },
                        hidden:true
                    },
                ]
            },
            /*订单管理*/
            {
                path: '/orders',
                name: 'orders',
                redirect: '/orders/dealList',
                component: RouteView,
                meta: { title: '订单管理', keepAlive: true, icon: "ordered-list", permission: ['dashboard'] },
                children: [
                    {
                        path: '/orders/dealList',
                        name: 'dealList',
                        component: () => import('@/views/orders/dealList'),
                        meta: { title: '交易列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/orders/outList',
                        name: 'outList',
                        component: () => import('@/views/orders/outList'),
                        meta: { title: '排单列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/orders/paiList',
                        name: 'paiList',
                        component: () => import('@/views/orders/paiList'),
                        meta: { title: '出单列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/orders/pipei',
                        name: 'pipei',
                        component: () => import('@/views/orders/pipei'),
                        meta: { title: '匹配列表', keepAlive: true, permission: ['dashboard'] },
                        hidden:true,
                    },
                ]
            },
            /*订单管理*/
            {
                path: '/record',
                name: 'record',
                redirect: '/record/recordMoney',
                component: RouteView,
                meta: { title: '日志管理', keepAlive: true, icon: "file-text", permission: ['dashboard'] },
                children: [
                    {
                        path: '/record/recordMoney',
                        name: 'recordMoney',
                        component: () => import('@/views/record/recordMoney'),
                        meta: { title: '财务日志', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/record/recordLogin',
                        name: 'recordLogin',
                        component: () => import('@/views/record/recordLogin'),
                        meta: { title: '登录日志', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/record/recordDo',
                        name: 'recordDo',
                        component: () => import('@/views/record/recordDo'),
                        meta: { title: '操作日志', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/record/recordRecharge',
                        name: 'recordRecharge',
                        component: () => import('@/views/record/recordRecharge'),
                        meta: { title: '充值日志', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/record/recordMemberLogin',
                        name: 'recordMemberLogin',
                        component: () => import('@/views/record/recordMemberLogin'),
                        meta: { title: '登录日志(会员)', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },
            /*配置项管理*/
            {
                path: '/config',
                name: 'config',
                redirect: '/config/index',
                component: RouteView,
                meta: { title: '配置项管理', keepAlive: true, icon: "setting", permission: ['dashboard'] },
                children: [
                    {
                        path: '/config/index',
                        name: 'configIndex',
                        component: () => import('@/views/config/index'),
                        meta: { title: '配置项', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/config/money',
                        name: 'configMoney',
                        component: () => import('@/views/config/money'),
                        meta: { title: '修改静态等级', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/config/dong',
                        name: 'configDong',
                        component: () => import('@/views/config/dong'),
                        meta: { title: '修改动态等级', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },
            /*轮播管理*/
            {
                path: '/banner',
                name: 'banner',
                redirect: '/banner/bannerList',
                component: RouteView,
                meta: { title: '轮播管理', keepAlive: true, icon: "picture", permission: ['dashboard'] },
                children: [
                    {
                        path: '/banner/bannerList',
                        name: 'bannerList',
                        component: () => import('@/views/banner/bannerList'),
                        meta: { title: '轮播列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/banner/bannerEdit',
                        name: 'bannerEdit',
                        component: () => import('@/views/banner/bannerEdit'),
                        meta: { title: '轮播(新增/编辑)', keepAlive: false, permission: ['dashboard'] },
                        hidden:true
                    },
                ]
            },
            /*新闻管理*/
            {
                path: '/news',
                name: 'news',
                redirect: '/news/newsList',
                component: RouteView,
                meta: { title: '新闻管理', keepAlive: true, icon: "notification", permission: ['dashboard'] },
                children: [
                    {
                        path: '/news/newsList',
                        name: 'newsList',
                        component: () => import('@/views/news/newsList'),
                        meta: { title: '新闻列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/news/newEdit',
                        name: 'newEdit',
                        component: () => import('@/views/news/newEdit'),
                        meta: { title: '新闻(新增/编辑)', keepAlive: false, permission: ['dashboard'] },
                        hidden:true
                    },
                ]
            },
            /*新闻管理*/
            {
                path: '/notice',
                name: 'notice',
                redirect: '/notice/noticeList',
                component: RouteView,
                meta: { title: '公告管理', keepAlive: true, icon: "notification", permission: ['dashboard'] },
                children: [
                    {
                        path: '/notice/noticeList',
                        name: 'noticeList',
                        component: () => import('@/views/notice/noticeList'),
                        meta: { title: '公告列表', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },
            /*投诉管理*/
            {
                path: '/ts',
                name: 'ts',
                redirect: '/ts/tsList',
                component: RouteView,
                meta: { title: '投诉管理', keepAlive: true, icon: "message", permission: ['dashboard'] },
                children: [
                    {
                        path: '/ts/tsList',
                        name: 'tsList',
                        component: () => import('@/views/ts/tsList'),
                        meta: { title: '投诉列表(未受理)', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/ts/tsList_do',
                        name: 'tsList_do',
                        component: () => import('@/views/ts/tsList_do'),
                        meta: { title: '投诉列表(已受理)', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },
            /*投诉管理*/
            {
                path: '/words',
                name: 'words',
                redirect: '/words/wordsList',
                component: RouteView,
                meta: { title: '留言管理', keepAlive: true, icon: "message", permission: ['dashboard'] },
                children: [
                    {
                        path: '/words/wordsList',
                        name: 'wordsList',
                        component: () => import('@/views/words/wordsList'),
                        meta: { title: '留言列表', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },
            /*权限管理*/
            {
                path: '/power',
                name: 'power',
                redirect: '/power/admin',
                component: RouteView,
                meta: { title: '权限管理', keepAlive: true, icon: "folder-open", permission: ['dashboard'] },
                children: [
                    {
                        path: '/power/admin',
                        name: 'admin',
                        component: () => import('@/views/power/admin'),
                        meta: { title: '管理员管理', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/power/user',
                        name: 'user',
                        component: () => import('@/views/power/user'),
                        meta: { title: '用户组管理', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/power/addUser',
                        name: 'addUser',
                        component: () => import('@/views/power/addUser'),
                        meta: { title: '新增用户组', keepAlive: false, permission: ['dashboard'] },
                        hidden:true
                    },
                ]
            },
            /*投诉管理*/
            /*{
                path: '/activity',
                name: 'activity',
                redirect: '/activity/pan',
                component: RouteView,
                meta: { title: '活动管理', keepAlive: true, icon: "message", permission: ['dashboard'] },
                children: [
                    {
                        path: '/activity/pan',
                        name: 'pan',
                        component: () => import('@/views/activity/pan'),
                        meta: { title: '转盘管理', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/activity/bag',
                        name: 'bag',
                        component: () => import('@/views/activity/bag'),
                        meta: { title: '宝箱列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/activity/lucyDay',
                        name: 'lucyDay',
                        component: () => import('@/views/activity/lucyDay'),
                        meta: { title: '幸运天数', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/activity/imgPan',
                        name: 'imgPan',
                        component: () => import('@/views/activity/imgPan'),
                        meta: { title: '转盘截图列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/activity/imgBag',
                        name: 'imgBag',
                        component: () => import('@/views/activity/imgBag'),
                        meta: { title: '宝箱截图列表', keepAlive: true, permission: ['dashboard'] },
                    },
                    {
                        path: '/activity/signTime',
                        name: 'signTime',
                        component: () => import('@/views/activity/signTime'),
                        meta: { title: '签到时间列表', keepAlive: true, permission: ['dashboard'] },
                    },
                ]
            },*/
        ]
    },
    {
        path: '*', redirect: '/404', hidden: true
    }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [
    {
        path: '/user',
        component: UserLayout,
        redirect: '/user/login',
        hidden: true,
        children: [
            {
                path: 'login',
                name: 'login',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Login')
            },
            {
                path: 'register',
                name: 'register',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
            },
            {
                path: 'register-result',
                name: 'registerResult',
                component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
            }
        ]
    },

    {
        path: '/test',
        component: BlankLayout,
        redirect: '/test/home',
        children: [
            {
                path: 'home',
                name: 'TestHome',
                component: () => import('@/views/Home')
            }
        ]
    },
    {
        path: '/404',
        component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
    }

]
